﻿<?php
include_once(dirname(__FILE__).'/MarketTree.class.php');
class SubItem extends MarketTree{
    function __construct($pid){
        parent::__construct($pid);
    }
    protected function getSql(){
        $sql = "SELECT typeID,techlevel,wasteFactor,
            text FROM invtypes,trntranslations,invblueprinttypes where marketGroupID = "
            .$this->getPid()." and typeID = keyID and typeID = productTypeID 
            and languageID = 'zh' and tcID = (select tcID from trntranslationcolumns
            where columnName = 'typeName');";
        return $sql;
    }
    protected function getTreeSubItem($row)
    {
        $sub_item = array('id'=>$row->typeID,
            'techlevel'=>$row->techlevel,
            'wastefactor'=>$row->wasteFactor,
            'name'=>$row->text);
        return $sub_item;
    }
}
?>
